POV-Ray : Newsgroups : povray.general : a function : Re: a function Server Time
19 Nov 2024 01:42:04 EST (-0500)
  Re: a function  
From: Michael Andrews
Date: 27 May 2002 09:05:52
Message: <3CF23169.FF4E9361@reading.ac.uk>
Hi Ingo,

ingo wrote:
> 
> There is more interesting stuff on the site, for example:
> http://glinda.lrsm.upenn.edu/~weeks/lcca1.html
> Would it be possible to make a POV-Ray pattern like that?
> 
> Ingo

Well, this one is easy :-)

// -- start --
#include "functions.inc"

global_settings { assumed_gamma 1.0 max_trace_level 5 }

background { color rgb 0.6*<4/7,5.5/7,1>^4 }

#declare camPos = <0.2, 7.5, -17.5>*15;
#declare camLookAt = <0,0,0>;
#declare camAngle = 30;

camera {
	up <0, 1, 0>
	right x*image_width/image_height
	location  camPos
	look_at   camLookAt
	angle     camAngle
}

#declare fn_Rad = function { pigment { radial colour_map{[0 rgb 0][1 rgb
1]}} }
#declare fn_Cusp = function {
fn_Rad(f_snoise3d(x/4,0,z/4),0,f_snoise3d(x/4,100,z/4)).x }

plane {
  y, 0
  pigment { function { fn_Cusp(x,y,z) }
    colour_map {[0 rgb x][1/3 rgb y][2/3 rgb z][1 rgb x]}
  }
  finish { ambient 1 diffuse 0 }
  rotate -90*x
  scale 5
}
// -- end --

Bye for now,
	Mike Andrews.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.